﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.UI.WebControls;
using System.Linq;
using System.Text;
using System.Configuration;

namespace TSV.Library.Common
{
    public class Constants
    {
           
        // Mail server
        public const string SMTP_MAIL_SERVER = "smtp3.logigear.com";
        public const string TSV_MAIL_FROM = "web@logigear.com";
        public const string PREFIX_EMAIL_LOGIGEAR = "@logigear.com";
          
        //Cookies Name
        public const string COOKIE_PORTAL = "CookiePortal";

        //Upload File
        public const string UPLOAD_ADV_IMAGE_PATH = "/FileUpload/Images/Advertising/";
        public const string UPLOAD_CATEGORY_PATH = "/Themes/images/";
        public const string UPLOAD_VITUAL_IMAGE_PATH = "/FileUpload/Images/";
        public const string UPLOAD_TEMP_PATH = "/FileUpload/TempUpload/";
        public const string UPLOAD_IMAGE_PATH = "/FileUpload/Images/News/";
        public const string UPLOAD_BANNER_IMAGE_PATH = "/FileUpload/Images/BigPartnerBanner/";
        public const string UPLOAD_FCK_FLASH_PATH = "/FileUpload/Images/FCK/Flash/";
        public const string UPLOAD_FCK_IMG_PATH = "/FileUpload/Images/FCK/img/";
        public const string PHOTO_PATH_ROOT_PARTNER = "/FileUpload/Images/Partner/";
        public const string UPLOAD_PHOTO_SUCCESS = "Upload Hình Ảnh Thành Công."; 
        public static readonly string UPLOAD_ALLOW_EXT = ConfigurationManager.AppSettings["allow_ext"];
        public static readonly string UPLOAD_ALLOW_IMG_EXT = ConfigurationManager.AppSettings["allow_img_ext"];
        public static readonly string UPLOAD_ALLOW_FLASH_EXT = ConfigurationManager.AppSettings["allow_flv_ext"];
        public static readonly int UPLOAD_FILE_SIZE = int.Parse(ConfigurationManager.AppSettings["maximum_file_size"]);

        public const int ACTIVE_FALSE = 1;
        public const int ACTIVE_TRUE = 0;
        public const string TRUE = "true";
        public const string FALSE = "false";        
        public const bool IS_ACTIVE = true;
        public const bool IS_NOT_ACTIVE = false;
        public const string NODATA = "- N/D -";

       

        // Number of item in auto complete
        public const int AUTO_COMPLETE_ITEMS = 10;
        public const string DATETIME_FORMAT_FRONT_END = "dd-MM-yyyy";
        public const string DATETIME_FORMAT_VIEW = "dd-MMM-yyyy";
        public const string DATETIME_FORMAT_CONTRACT = "yyyy.MM.dd";
        public const string DATETIME_FORMAT = "dd/MM/yyyy";
        public const string DATETIME_FORMAT_DB = "MM/dd/yyyy";
        public const string UNIQUE_CONTRACT = ".yyyy_MM_dd";
        public const string UNIQUE_TIME = "HH_mm_ss_ffff";
        public const string DATETIME_FORMAT_FULL_LOG = "dd-MMM-yyyy hh:mm";
        public const string DATETIME_FORMAT_JR = "dd/MM/yyyy hh:mm";
        public const string DATETIME_FORMAT_FULL = "dd-MMM-yyyy hh:mm:ss tt";
        public static int FILE_NAME_VIEW = 20;
        public static char FILE_CHAR_PREFIX = ':';
        public static string FILE_STRING_PREFIX = ":";

        public const string USERNAME = "Tên Người Dùng";
        public const string GROUPNAME = "Tên Nhóm";
        public const string COLLABORATOR_NAME = "Tên Cộng Tác Viên";
        public const string CATEGORY_NAME = "Tên Danh Mục";        
        public const string PARTNER_NAME = "Tên Đối Tác";

        //Top news
        public const int TOP_NEWS = 10;

        //News
        public const string NEWS_FIRST_ITEM = "Chọn ưu tiên";
        public const string NEWS_FIRST_CATEGORY = "Danh mục";
        public const int NEWS_ROUND_WORLD = 40;
        public const int NEWS_ROUND_WORLD_HOME_PAGE = 40;
        public static List<ListItem> NEWS_ORDERS
        {
            get
            {
                List<ListItem> order = new List<ListItem>();
                for (int i = 1; i < 6; i++)
                {
                    order.Add(new ListItem(i.ToString(), i.ToString()));
                }
                return order;
            }
        }

        //Category
        public const string CATEGORY_FIRST_ITEM = "Chọn loại đối tác";
        public const string PARENT_CATEGORY_FIRST_ITEM = "-Chọn danh mục cha-";
        public const string CATEGORY_FIRST_DISTRICT = "Quận/Huyện";
        public const string CATEGORY_FIRST_PROVINCE = "Tỉnh/Thành";
        public const string PARTNER_DEFAULT_VALUE = "Partner";
		public const string CATEGORY_DEFAULT_VALUE = "Category";
        public const string PROMOTION_DEFAULT_VALUE = "Promotion";        
        public const string PHOTO_PATH_ROOT_CATEGORY = "/FileUpload/Images/Category/";
        public const string NO_IMAGE = "NoImage.jpg";
        //Filter
        public const string FILTER_TEXT = "filter_text";
        public const string FILTER_PROVINCE_VALUE = "FILTER_PROVINCE_VALUE";
        public const string FILTER_DISTRICT_VALUE = "FILTER_DISTRICT_VALUE";
        public const string FILTER_CATEGORY_VALUE = "FILTER_CATEGORY_VALUE";

        //Global Search
        public const string GLOBAL_FILTER_TEXT = "GLOBAL_FILTER_TEXT";
        public const string GLOBAL_FILTER_CATEGORY = "GLOBAL_FILTER_CATEGORY";
        public const string GLOBAL_FILTER_PROVINCE = "GLOBAL_FILTER_PROVINCE";
        public const string GLOBAL_FILTER_DISTRICT = "GLOBAL_FILTER_DISTRICT";
        public const string GLOBAL_FILTER_TEXT_DEFAULT = "Nhập từ khóa";
        //==>Tuan
        public static List<ListItem> ADV_POSITION
        {
            get
            {
                List<ListItem> items = new List<ListItem>();

                items.Add(new ListItem("Chọn...", ""));
                items.Add(new ListItem("Trên", "T"));
                items.Add(new ListItem("Dưới", "B"));
                items.Add(new ListItem("Trái", "L"));
                               
                return items;
            }
        }

        public const string SERVER_COOKIE = "p@ssw0rddst3@m";
        public static readonly int DEFAULT_PAGE_SIZE = int.Parse(ConfigurationManager.AppSettings["defaultPageSize"]);
        public static readonly string YAHOO_NICK = ConfigurationManager.AppSettings["yahoo"];
        public static readonly string SKY_NICK = ConfigurationManager.AppSettings["skype"];
        //
    }
}
